#/bin/bash

git pull --rebase
docker images | grep pre/ice-admin &>/dev/null
if [ $? -eq 0 ]; then
  docker rmi pre/ice-admin:pre
fi

docker images | grep ice-admin &>/dev/null
if [ $? -eq 0 ]; then
  docker tag ice-admin:lastest pre/ice-admin:pre
fi

docker build -t ice-admin:lastest -f ./Dockerfile --no-cache .
